<?php

namespace app\validate\home;

use app\common\validate\BaseValidate;

/**
 * Class Validate
 * https://www.kancloud.cn/manual/thinkphp6_0/1037624
 * @package app\daily\validate
 */
class Test extends BaseValidate
{
    //定义验证规则
    protected $rule = [
        'name' => 'require',
    ];

    //定义验证提示
    protected $message = [
        'name.require' => '名称必须',
    ];

    //定义验证场景要与方法名相同走自动验证
    protected $scene = [
        'create' => ['name'],
    ];

}
